Check if variable is of integer or stringΒΆ

Check if variable is of integer or string.
print(isinstance(25, int) or isinstance(25, str))
print(isinstance([25], int) or isinstance([25], str))
print(isinstance("25", int) or isinstance("25", str))

Output:

True
False
True